package org.edu.modules.message.service.impl;

import org.edu.modules.message.entity.VeMsgInterface;
import org.edu.modules.message.mapper.VeMsgInterfaceMapper;
import org.edu.modules.message.service.IVeMsgInterfaceService;
import org.edu.modules.message.vo.MsgInterfaceCountVo;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: 系统接口
 * @Author: jeecg-boot
 * @Date:   2021-05-10
 * @Version: V1.0
 */
@Service
public class VeMsgInterfaceServiceImpl extends ServiceImpl<VeMsgInterfaceMapper, VeMsgInterface> implements IVeMsgInterfaceService {

    @Override
    @Transactional
    public Map getCount(String start, String end, Integer dateNum) {
        Map<String, Object> resultMap = new HashMap<>();
        List<MsgInterfaceCountVo> list = baseMapper.getCount(start, end, "edu-stu-code", dateNum);
        resultMap.put("学生系统", list);
        list = baseMapper.getCount(start, end, "edu_sbzc_code", dateNum);
        resultMap.put("资产系统", list);
        list = baseMapper.getCount(start, end, "edu_orientation_code", dateNum);
        resultMap.put("迎新新系统", list);
        list = baseMapper.getCount(start, end, "edu_safe_code", dateNum);
        resultMap.put("安全系统", list);
        list = baseMapper.getCount(start, end, "edu_jwxt_code", dateNum);
        resultMap.put("教务系统", list);
        list = baseMapper.getCount(start, end, "edu_logistisc_code", dateNum);
        resultMap.put("后勤系统", list);
        return resultMap;
    }
}
